This function will return the current d3d device pointer, which you can then (for example) pass through to a DLL or Dylib on Windows and macOS.
NOTE: This function has been deprecated in GameMaker Studio 2 in favour of os_get_info.
window_device();
Pointer
gfx_pointer = window_device()
The above code will store the d3d device pointer in a variable.